{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [],
   "source": [
    "from io import BytesIO\n",
    "import numpy as np\n",
    "from tensorflow.python.lib.io import file_io\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {},
   "outputs": [],
   "source": [
    "file_full_path='gs://ecg-data/test-results/iden-chinaprivate/testset_results_china_private-2021-03-31-04-18-58.csv'\n",
    "f = BytesIO(file_io.read_file_to_string(file_full_path, binary_mode=True))\n",
    "np_data_loaded = np.loadtxt(f, delimiter=' ')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "metadata": {},
   "outputs": [],
   "source": [
    "identif_attributes = pd.DataFrame(data=np_data_loaded)\n",
    "identif_attributes.columns=['y_pred','y_actual','patient_id','diagnosis','age','gender','race']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y_pred</th>\n",
       "      <th>y_actual</th>\n",
       "      <th>patient_id</th>\n",
       "      <th>diagnosis</th>\n",
       "      <th>age</th>\n",
       "      <th>gender</th>\n",
       "      <th>race</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>7339.0</td>\n",
       "      <td>7339.0</td>\n",
       "      <td>7480.0</td>\n",
       "      <td>14.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>23943.0</td>\n",
       "      <td>23943.0</td>\n",
       "      <td>24594.0</td>\n",
       "      <td>4343.0</td>\n",
       "      <td>47.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>21470.0</td>\n",
       "      <td>21470.0</td>\n",
       "      <td>22006.0</td>\n",
       "      <td>1172.0</td>\n",
       "      <td>77.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>25582.0</td>\n",
       "      <td>25582.0</td>\n",
       "      <td>26291.0</td>\n",
       "      <td>4628.0</td>\n",
       "      <td>51.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>32412.0</td>\n",
       "      <td>32412.0</td>\n",
       "      <td>33478.0</td>\n",
       "      <td>3448.0</td>\n",
       "      <td>73.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    y_pred  y_actual  patient_id  diagnosis   age  gender  race\n",
       "0   7339.0    7339.0      7480.0       14.0  80.0     1.0   0.0\n",
       "1  23943.0   23943.0     24594.0     4343.0  47.0     0.0   0.0\n",
       "2  21470.0   21470.0     22006.0     1172.0  77.0     1.0   0.0\n",
       "3  25582.0   25582.0     26291.0     4628.0  51.0     1.0   0.0\n",
       "4  32412.0   32412.0     33478.0     3448.0  73.0     0.0   0.0"
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "identif_attributes.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "metadata": {},
   "outputs": [],
   "source": [
    "missidentifications1=identif_attributes[identif_attributes['y_actual']!=identif_attributes['y_pred']]\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "metadata": {},
   "outputs": [],
   "source": [
    "identifications1=identif_attributes[identif_attributes['y_actual']==identif_attributes['y_pred']]\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### by diagnosis"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "metadata": {},
   "outputs": [],
   "source": [
    "missidentifications_condition_count=missidentifications1.groupby(['diagnosis']).size().reset_index(name='miss_count')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>diagnosis</th>\n",
       "      <th>miss_count</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>14.0</td>\n",
       "      <td>129</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>18.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>19.0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>38.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   diagnosis  miss_count\n",
       "0        3.0           1\n",
       "1       14.0         129\n",
       "2       18.0           1\n",
       "3       19.0           2\n",
       "4       38.0           1"
      ]
     },
     "execution_count": 92,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "missidentifications_condition_count.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "metadata": {},
   "outputs": [],
   "source": [
    "identifications_condition_count=identifications1.groupby(['diagnosis']).size().reset_index(name='correct_count')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>diagnosis</th>\n",
       "      <th>correct_count</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2.0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   diagnosis  correct_count\n",
       "0        0.0              3\n",
       "1        1.0              1\n",
       "2        2.0              9\n",
       "3        3.0              1\n",
       "4        4.0              3"
      ]
     },
     "execution_count": 94,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "identifications_condition_count.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {},
   "outputs": [],
   "source": [
    "merged=identifications_condition_count.merge(missidentifications_condition_count, how='outer', on=['diagnosis'])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>diagnosis</th>\n",
       "      <th>correct_count</th>\n",
       "      <th>miss_count</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2.0</td>\n",
       "      <td>9.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   diagnosis  correct_count  miss_count\n",
       "0        0.0            3.0         NaN\n",
       "1        1.0            1.0         NaN\n",
       "2        2.0            9.0         NaN\n",
       "3        3.0            1.0         1.0\n",
       "4        4.0            3.0         NaN"
      ]
     },
     "execution_count": 96,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merged.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "metadata": {},
   "outputs": [],
   "source": [
    "merged=merged.fillna(0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>diagnosis</th>\n",
       "      <th>correct_count</th>\n",
       "      <th>miss_count</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2.0</td>\n",
       "      <td>9.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   diagnosis  correct_count  miss_count\n",
       "0        0.0            3.0         0.0\n",
       "1        1.0            1.0         0.0\n",
       "2        2.0            9.0         0.0\n",
       "3        3.0            1.0         1.0\n",
       "4        4.0            3.0         0.0"
      ]
     },
     "execution_count": 98,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merged.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {},
   "outputs": [],
   "source": [
    "merged['sum_classifications']=merged['correct_count']+merged['miss_count']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>diagnosis</th>\n",
       "      <th>correct_count</th>\n",
       "      <th>miss_count</th>\n",
       "      <th>sum_classifications</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2.0</td>\n",
       "      <td>9.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   diagnosis  correct_count  miss_count  sum_classifications\n",
       "0        0.0            3.0         0.0                  3.0\n",
       "1        1.0            1.0         0.0                  1.0\n",
       "2        2.0            9.0         0.0                  9.0\n",
       "3        3.0            1.0         1.0                  2.0\n",
       "4        4.0            3.0         0.0                  3.0"
      ]
     },
     "execution_count": 100,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merged.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 106,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>diagnosis</th>\n",
       "      <th>correct_count</th>\n",
       "      <th>miss_count</th>\n",
       "      <th>sum_classifications</th>\n",
       "      <th>rate</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2.0</td>\n",
       "      <td>9.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>9.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>5.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>6.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>7.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>8.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>9.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   diagnosis  correct_count  miss_count  sum_classifications  rate\n",
       "0        0.0            3.0         0.0                  3.0   0.0\n",
       "1        1.0            1.0         0.0                  1.0   0.0\n",
       "2        2.0            9.0         0.0                  9.0   0.0\n",
       "3        3.0            1.0         1.0                  2.0   0.5\n",
       "4        4.0            3.0         0.0                  3.0   0.0\n",
       "5        5.0            2.0         0.0                  2.0   0.0\n",
       "6        6.0            4.0         0.0                  4.0   0.0\n",
       "7        7.0            2.0         0.0                  2.0   0.0\n",
       "8        8.0            1.0         0.0                  1.0   0.0\n",
       "9        9.0            3.0         0.0                  3.0   0.0"
      ]
     },
     "execution_count": 106,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merged['rate']=merged['miss_count']/merged['sum_classifications']\n",
    "merged.head(n=10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 107,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(4608, 5)"
      ]
     },
     "execution_count": 107,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merged.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>dataset_name</th>\n",
       "      <th>patient_id</th>\n",
       "      <th>file_name</th>\n",
       "      <th>age</th>\n",
       "      <th>gender</th>\n",
       "      <th>diagnosis</th>\n",
       "      <th>race</th>\n",
       "      <th>sample_num</th>\n",
       "      <th>race_encoded</th>\n",
       "      <th>gender_encoded</th>\n",
       "      <th>diagnosis_encoded</th>\n",
       "      <th>patient_id_encoded</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>china_private</td>\n",
       "      <td>880947374</td>\n",
       "      <td>MUSE_20180115_124154_98000.csv</td>\n",
       "      <td>20</td>\n",
       "      <td>Female</td>\n",
       "      <td>STach</td>\n",
       "      <td>chinese</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>4739</td>\n",
       "      <td>33270</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>china_private</td>\n",
       "      <td>880957431</td>\n",
       "      <td>MUSE_20180112_071158_01000.csv</td>\n",
       "      <td>22</td>\n",
       "      <td>Female</td>\n",
       "      <td>STach</td>\n",
       "      <td>chinese</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>4739</td>\n",
       "      <td>34652</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>china_private</td>\n",
       "      <td>880878772</td>\n",
       "      <td>MUSE_20180114_123835_64000.csv</td>\n",
       "      <td>67</td>\n",
       "      <td>Female</td>\n",
       "      <td>CLBBB CVCL STach</td>\n",
       "      <td>chinese</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>2380</td>\n",
       "      <td>25921</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>china_private</td>\n",
       "      <td>2968425</td>\n",
       "      <td>MUSE_20180210_124733_04000.csv</td>\n",
       "      <td>68</td>\n",
       "      <td>Male</td>\n",
       "      <td>AMI CVCL LAnFB RRWP SNR STE TTW</td>\n",
       "      <td>chinese</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1692</td>\n",
       "      <td>16604</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>china_private</td>\n",
       "      <td>10956457</td>\n",
       "      <td>MUSE_20180118_173322_76000.csv</td>\n",
       "      <td>65</td>\n",
       "      <td>Female</td>\n",
       "      <td>CVCL STach TAb</td>\n",
       "      <td>chinese</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>2773</td>\n",
       "      <td>6099</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    dataset_name patient_id                       file_name  age  gender  \\\n",
       "0  china_private  880947374  MUSE_20180115_124154_98000.csv   20  Female   \n",
       "1  china_private  880957431  MUSE_20180112_071158_01000.csv   22  Female   \n",
       "2  china_private  880878772  MUSE_20180114_123835_64000.csv   67  Female   \n",
       "3  china_private    2968425  MUSE_20180210_124733_04000.csv   68    Male   \n",
       "4  china_private   10956457  MUSE_20180118_173322_76000.csv   65  Female   \n",
       "\n",
       "                         diagnosis     race  sample_num  race_encoded  \\\n",
       "0                            STach  chinese           0             0   \n",
       "1                            STach  chinese           0             0   \n",
       "2                 CLBBB CVCL STach  chinese           0             0   \n",
       "3  AMI CVCL LAnFB RRWP SNR STE TTW  chinese           0             0   \n",
       "4                   CVCL STach TAb  chinese           0             0   \n",
       "\n",
       "   gender_encoded  diagnosis_encoded  patient_id_encoded  \n",
       "0               1               4739               33270  \n",
       "1               1               4739               34652  \n",
       "2               1               2380               25921  \n",
       "3               0               1692               16604  \n",
       "4               1               2773                6099  "
      ]
     },
     "execution_count": 108,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "output_csv_file_path='/Users/aring/Desktop/ECG-identification/Arnold-data/china_private1_labels_all_new2.csv'\n",
    "labels=pd.read_csv(output_csv_file_path)\n",
    "labels.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "metadata": {},
   "outputs": [],
   "source": [
    "daignosis_labels=labels.loc[:,['diagnosis_encoded','diagnosis']].drop_duplicates()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "metadata": {},
   "outputs": [],
   "source": [
    "merged.columns=['diagnosis_encoded','correct_count','miss_count','sum_classifications','rate']\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "metadata": {},
   "outputs": [],
   "source": [
    "merged=merged.merge(daignosis_labels, how='inner', on=['diagnosis_encoded'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>diagnosis_encoded</th>\n",
       "      <th>correct_count</th>\n",
       "      <th>miss_count</th>\n",
       "      <th>sum_classifications</th>\n",
       "      <th>rate</th>\n",
       "      <th>diagnosis</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>AAR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>AAR AMI LQT QAb STE TAb</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2.0</td>\n",
       "      <td>9.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>9.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>AAR AnMI LAD STC</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.5</td>\n",
       "      <td>AAR Atrial_Escape_Beat PAC SB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>AAR CRBBB STE</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   diagnosis_encoded  correct_count  miss_count  sum_classifications  rate  \\\n",
       "0                0.0            3.0         0.0                  3.0   0.0   \n",
       "1                1.0            1.0         0.0                  1.0   0.0   \n",
       "2                2.0            9.0         0.0                  9.0   0.0   \n",
       "3                3.0            1.0         1.0                  2.0   0.5   \n",
       "4                4.0            3.0         0.0                  3.0   0.0   \n",
       "\n",
       "                       diagnosis  \n",
       "0                            AAR  \n",
       "1        AAR AMI LQT QAb STE TAb  \n",
       "2               AAR AnMI LAD STC  \n",
       "3  AAR Atrial_Escape_Beat PAC SB  \n",
       "4                  AAR CRBBB STE  "
      ]
     },
     "execution_count": 112,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merged.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(4608, 6)"
      ]
     },
     "execution_count": 113,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merged.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 114,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4764"
      ]
     },
     "execution_count": 114,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "daignosis_labels.diagnosis.unique().size"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 115,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(4764, 2)"
      ]
     },
     "execution_count": 115,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "daignosis_labels.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 116,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(4764,)"
      ]
     },
     "execution_count": 116,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "daignosis_labels.diagnosis.unique().shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 141,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ID</th>\n",
       "      <th>DiagCode</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>MUSE_20180113_180130_23000</td>\n",
       "      <td>STach</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>MUSE_20180113_180131_30000</td>\n",
       "      <td>STach</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>MUSE_20180113_180139_35000</td>\n",
       "      <td>STach</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>MUSE_20180113_180143_59000</td>\n",
       "      <td>STach</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>MUSE_20180113_131105_22000</td>\n",
       "      <td>VEsR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>MUSE_20180116_131237_15000</td>\n",
       "      <td>AF PR TAb TInv</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>MUSE_20180116_131235_03000</td>\n",
       "      <td>AF TAb</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>MUSE_20180116_131239_26000</td>\n",
       "      <td>AF TAb</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>MUSE_20180116_131240_34000</td>\n",
       "      <td>AF TAb</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>MUSE_20180114_072910_38000</td>\n",
       "      <td>AF PR</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                            ID        DiagCode\n",
       "0   MUSE_20180113_180130_23000           STach\n",
       "1   MUSE_20180113_180131_30000           STach\n",
       "2   MUSE_20180113_180139_35000           STach\n",
       "3   MUSE_20180113_180143_59000           STach\n",
       "4   MUSE_20180113_131105_22000            VEsR\n",
       "..                         ...             ...\n",
       "95  MUSE_20180116_131237_15000  AF PR TAb TInv\n",
       "96  MUSE_20180116_131235_03000          AF TAb\n",
       "97  MUSE_20180116_131239_26000          AF TAb\n",
       "98  MUSE_20180116_131240_34000          AF TAb\n",
       "99  MUSE_20180114_072910_38000           AF PR\n",
       "\n",
       "[100 rows x 2 columns]"
      ]
     },
     "execution_count": 141,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "root_path='/Users/aring/Desktop/ECG-identification/Arnold-data'\n",
    "new_diagnoses_codes_df = pd.read_csv(root_path+'/SXNBData_China_DiagnosisCode.csv')\n",
    "new_diagnoses_codes_df.head(n=100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 118,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(4764,)"
      ]
     },
     "execution_count": 118,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "new_diagnoses_codes_df.DiagCode.unique().shape"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### by gender\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 119,
   "metadata": {},
   "outputs": [],
   "source": [
    "missidentifications_gender_count=missidentifications1.groupby(['gender']).size().reset_index(name='miss_count')\n",
    "identifications_gender_count=identifications1.groupby(['gender']).size().reset_index(name='correct_count')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>gender</th>\n",
       "      <th>miss_count</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.0</td>\n",
       "      <td>1250</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>768</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2.0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   gender  miss_count\n",
       "0     0.0        1250\n",
       "1     1.0         768\n",
       "2     2.0           2"
      ]
     },
     "execution_count": 120,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "missidentifications_gender_count.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 121,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>gender</th>\n",
       "      <th>correct_count</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.0</td>\n",
       "      <td>53203</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>44280</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2.0</td>\n",
       "      <td>80</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   gender  correct_count\n",
       "0     0.0          53203\n",
       "1     1.0          44280\n",
       "2     2.0             80"
      ]
     },
     "execution_count": 121,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "identifications_gender_count.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 122,
   "metadata": {},
   "outputs": [],
   "source": [
    "merged=identifications_gender_count.merge(missidentifications_gender_count, how='outer', on=['gender'])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 123,
   "metadata": {},
   "outputs": [],
   "source": [
    "merged['sum_classifications']=merged['correct_count']+merged['miss_count']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 124,
   "metadata": {},
   "outputs": [],
   "source": [
    "merged['rate']=merged['miss_count']/merged['sum_classifications']\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 125,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>gender</th>\n",
       "      <th>correct_count</th>\n",
       "      <th>miss_count</th>\n",
       "      <th>sum_classifications</th>\n",
       "      <th>rate</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.0</td>\n",
       "      <td>53203</td>\n",
       "      <td>1250</td>\n",
       "      <td>54453</td>\n",
       "      <td>0.022956</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>44280</td>\n",
       "      <td>768</td>\n",
       "      <td>45048</td>\n",
       "      <td>0.017048</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2.0</td>\n",
       "      <td>80</td>\n",
       "      <td>2</td>\n",
       "      <td>82</td>\n",
       "      <td>0.024390</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   gender  correct_count  miss_count  sum_classifications      rate\n",
       "0     0.0          53203        1250                54453  0.022956\n",
       "1     1.0          44280         768                45048  0.017048\n",
       "2     2.0             80           2                   82  0.024390"
      ]
     },
     "execution_count": 125,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merged.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### by age"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 126,
   "metadata": {},
   "outputs": [],
   "source": [
    "missidentifications_age_count=missidentifications1.groupby(['age']).size().reset_index(name='miss_count')\n",
    "identifications_age_count=identifications1.groupby(['age']).size().reset_index(name='correct_count')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 127,
   "metadata": {},
   "outputs": [],
   "source": [
    "missidentifications_age_count=missidentifications_age_count[missidentifications_age_count['age']!=-1]\n",
    "identifications_age_count=identifications_age_count[identifications_age_count['age']!=-1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 128,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(92, 2)"
      ]
     },
     "execution_count": 128,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "missidentifications_age_count.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 129,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(98, 2)"
      ]
     },
     "execution_count": 129,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "identifications_age_count.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 130,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>age</th>\n",
       "      <th>correct_count</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.0</td>\n",
       "      <td>586</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>4.0</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>5.0</td>\n",
       "      <td>229</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>6.0</td>\n",
       "      <td>257</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>7.0</td>\n",
       "      <td>209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>94</th>\n",
       "      <td>96.0</td>\n",
       "      <td>52</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>97.0</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>98.0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>100.0</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>108.0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>98 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      age  correct_count\n",
       "1     0.0            586\n",
       "2     4.0            135\n",
       "3     5.0            229\n",
       "4     6.0            257\n",
       "5     7.0            209\n",
       "..    ...            ...\n",
       "94   96.0             52\n",
       "95   97.0             19\n",
       "96   98.0              9\n",
       "97  100.0             10\n",
       "98  108.0              3\n",
       "\n",
       "[98 rows x 2 columns]"
      ]
     },
     "execution_count": 130,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "identifications_age_count"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 131,
   "metadata": {},
   "outputs": [],
   "source": [
    "merged=identifications_age_count.merge(missidentifications_age_count, how='outer', on=['age'])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 132,
   "metadata": {},
   "outputs": [],
   "source": [
    "merged=merged.fillna(0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 133,
   "metadata": {},
   "outputs": [],
   "source": [
    "merged['sum_classifications']=merged['correct_count']+merged['miss_count']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 134,
   "metadata": {},
   "outputs": [],
   "source": [
    "merged['rate']=merged['miss_count']/merged['sum_classifications']\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 135,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(98, 5)"
      ]
     },
     "execution_count": 135,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merged.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 136,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x14c126e48>]"
      ]
     },
     "execution_count": 136,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9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bCBiL4gCEIBIaIvCIJQQIjoC4IgFBAi+oIgCAWEiL4gCEIBIaIvCIJQQIjoC4IgFBD/D6BNR3KfqvmYAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    " plt.plot( merged['age'],merged['rate']) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 137,
   "metadata": {},
   "outputs": [],
   "source": [
    "ages=merged['age'].values\n",
    "miss_rates=merged['rate'].values\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 138,
   "metadata": {},
   "outputs": [],
   "source": [
    "ages=np.concatenate([ages, np.zeros(2)])\n",
    "miss_rates=np.concatenate([miss_rates, np.zeros(2)])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 139,
   "metadata": {},
   "outputs": [],
   "source": [
    "miss_rates_grouped = miss_rates.reshape(10,10)\n",
    "\n",
    "rates_grouped_sum=np.sum(miss_rates_grouped, axis=1)\n",
    "\n",
    "avg_rates_for_groups=np.divide(rates_grouped_sum,10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 140,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAeUAAAFCCAYAAADPKcU0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAGfdJREFUeJzt3X+QZWWd3/H3Z2cEf4MOw5YLZBsD7gZw1x+zqHG1NhIUF3XcCMVQlhKXLdYfZH9YqWSoFCRLtApcE41ZdEXBIKWCwWWdyCirohV1DdIElBnY0RZnw4iJQ4FE3SCO+80f9xm9c+2ePj3TPf00835V3epznvuc537Puaf70+fc06dTVUiSpOX3C8tdgCRJGjGUJUn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EnylLktQJQ1mSpE4YypIkdcJQliSpE4ayJEmdMJQlSeqEoSxJUif+P3/8Lp/OHWQAAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig = plt.figure()\n",
    "ax = fig.add_axes([0,0,1,1])\n",
    "x = ['0-10', '10-20', '20-30', '30-40', '40-50', '40-50', '50-60', '60-70', '80-90', '90-100']\n",
    "ax.bar(x,avg_rates_for_groups)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## analysis for sinus rhythm only"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### By Gender"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y_pred</th>\n",
       "      <th>y_actual</th>\n",
       "      <th>patient_id</th>\n",
       "      <th>diagnosis</th>\n",
       "      <th>age</th>\n",
       "      <th>gender</th>\n",
       "      <th>race</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>34670.0</td>\n",
       "      <td>27049.0</td>\n",
       "      <td>27935.0</td>\n",
       "      <td>1806.0</td>\n",
       "      <td>21.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>23853.0</td>\n",
       "      <td>23853.0</td>\n",
       "      <td>24541.0</td>\n",
       "      <td>3041.0</td>\n",
       "      <td>39.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>5706.0</td>\n",
       "      <td>5706.0</td>\n",
       "      <td>5758.0</td>\n",
       "      <td>3169.0</td>\n",
       "      <td>56.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3171.0</td>\n",
       "      <td>25422.0</td>\n",
       "      <td>26224.0</td>\n",
       "      <td>1814.0</td>\n",
       "      <td>43.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5274.0</td>\n",
       "      <td>5274.0</td>\n",
       "      <td>5309.0</td>\n",
       "      <td>2392.0</td>\n",
       "      <td>60.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    y_pred  y_actual  patient_id  diagnosis   age  gender  race\n",
       "0  34670.0   27049.0     27935.0     1806.0  21.0     1.0   0.0\n",
       "1  23853.0   23853.0     24541.0     3041.0  39.0     0.0   0.0\n",
       "2   5706.0    5706.0      5758.0     3169.0  56.0     1.0   0.0\n",
       "3   3171.0   25422.0     26224.0     1814.0  43.0     1.0   0.0\n",
       "4   5274.0    5274.0      5309.0     2392.0  60.0     1.0   0.0"
      ]
     },
     "execution_count": 85,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "identif_attributes.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 142,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ID</th>\n",
       "      <th>DiagCode</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>52</th>\n",
       "      <td>MUSE_20180210_130928_66000</td>\n",
       "      <td>SNR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>60</th>\n",
       "      <td>MUSE_20180209_173743_30000</td>\n",
       "      <td>SNR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>61</th>\n",
       "      <td>MUSE_20180209_173744_35000</td>\n",
       "      <td>SNR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>218</th>\n",
       "      <td>MUSE_20180209_124011_82000</td>\n",
       "      <td>SNR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>219</th>\n",
       "      <td>MUSE_20180210_124913_45000</td>\n",
       "      <td>SNR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40607</th>\n",
       "      <td>MUSE_20180209_123609_63000</td>\n",
       "      <td>SNR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40608</th>\n",
       "      <td>MUSE_20180209_130858_19000</td>\n",
       "      <td>SNR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40609</th>\n",
       "      <td>MUSE_20180209_132609_18000</td>\n",
       "      <td>SNR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45307</th>\n",
       "      <td>MUSE_20180116_124311_28000</td>\n",
       "      <td>SNR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45308</th>\n",
       "      <td>MUSE_20180119_180042_46000</td>\n",
       "      <td>SNR</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5886 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                               ID DiagCode\n",
       "52     MUSE_20180210_130928_66000      SNR\n",
       "60     MUSE_20180209_173743_30000      SNR\n",
       "61     MUSE_20180209_173744_35000      SNR\n",
       "218    MUSE_20180209_124011_82000      SNR\n",
       "219    MUSE_20180210_124913_45000      SNR\n",
       "...                           ...      ...\n",
       "40607  MUSE_20180209_123609_63000      SNR\n",
       "40608  MUSE_20180209_130858_19000      SNR\n",
       "40609  MUSE_20180209_132609_18000      SNR\n",
       "45307  MUSE_20180116_124311_28000      SNR\n",
       "45308  MUSE_20180119_180042_46000      SNR\n",
       "\n",
       "[5886 rows x 2 columns]"
      ]
     },
     "execution_count": 142,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "new_diagnoses_codes_df[new_diagnoses_codes_df['DiagCode']=='SNR']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 143,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>dataset_name</th>\n",
       "      <th>patient_id</th>\n",
       "      <th>file_name</th>\n",
       "      <th>age</th>\n",
       "      <th>gender</th>\n",
       "      <th>diagnosis</th>\n",
       "      <th>race</th>\n",
       "      <th>sample_num</th>\n",
       "      <th>race_encoded</th>\n",
       "      <th>gender_encoded</th>\n",
       "      <th>diagnosis_encoded</th>\n",
       "      <th>patient_id_encoded</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>32758</th>\n",
       "      <td>china_private</td>\n",
       "      <td>34722</td>\n",
       "      <td>MUSE_20180210_130928_66000.csv</td>\n",
       "      <td>78</td>\n",
       "      <td>Female</td>\n",
       "      <td>SNR</td>\n",
       "      <td>chinese</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>4668</td>\n",
       "      <td>17385</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        dataset_name patient_id                       file_name  age  gender  \\\n",
       "32758  china_private      34722  MUSE_20180210_130928_66000.csv   78  Female   \n",
       "\n",
       "      diagnosis     race  sample_num  race_encoded  gender_encoded  \\\n",
       "32758       SNR  chinese           0             0               1   \n",
       "\n",
       "       diagnosis_encoded  patient_id_encoded  \n",
       "32758               4668               17385  "
      ]
     },
     "execution_count": 143,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "labels[labels['file_name']=='MUSE_20180210_130928_66000'+'.csv']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 144,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y_pred</th>\n",
       "      <th>y_actual</th>\n",
       "      <th>patient_id</th>\n",
       "      <th>diagnosis</th>\n",
       "      <th>age</th>\n",
       "      <th>gender</th>\n",
       "      <th>race</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>35559.0</td>\n",
       "      <td>35559.0</td>\n",
       "      <td>36842.0</td>\n",
       "      <td>4668.0</td>\n",
       "      <td>31.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>14207.0</td>\n",
       "      <td>14207.0</td>\n",
       "      <td>14515.0</td>\n",
       "      <td>4668.0</td>\n",
       "      <td>43.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>14200.0</td>\n",
       "      <td>14200.0</td>\n",
       "      <td>14508.0</td>\n",
       "      <td>4668.0</td>\n",
       "      <td>43.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>63</th>\n",
       "      <td>16798.0</td>\n",
       "      <td>16798.0</td>\n",
       "      <td>17136.0</td>\n",
       "      <td>4668.0</td>\n",
       "      <td>79.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>80</th>\n",
       "      <td>14304.0</td>\n",
       "      <td>14304.0</td>\n",
       "      <td>14613.0</td>\n",
       "      <td>4668.0</td>\n",
       "      <td>28.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     y_pred  y_actual  patient_id  diagnosis   age  gender  race\n",
       "24  35559.0   35559.0     36842.0     4668.0  31.0     1.0   0.0\n",
       "43  14207.0   14207.0     14515.0     4668.0  43.0     0.0   0.0\n",
       "45  14200.0   14200.0     14508.0     4668.0  43.0     0.0   0.0\n",
       "63  16798.0   16798.0     17136.0     4668.0  79.0     1.0   0.0\n",
       "80  14304.0   14304.0     14613.0     4668.0  28.0     1.0   0.0"
      ]
     },
     "execution_count": 144,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "identif_attributes_sinus=identif_attributes[identif_attributes['diagnosis']==4668]\n",
    "identif_attributes_sinus.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 145,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(12335, 7)"
      ]
     },
     "execution_count": 145,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "identif_attributes_sinus.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 146,
   "metadata": {},
   "outputs": [],
   "source": [
    "missidentifications_sinus=identif_attributes_sinus[identif_attributes_sinus['y_actual']!=identif_attributes_sinus['y_pred']]\n",
    "identifications_sinus=identif_attributes_sinus[identif_attributes_sinus['y_actual']==identif_attributes_sinus['y_pred']]\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 147,
   "metadata": {},
   "outputs": [],
   "source": [
    "missidentifications_gender_count=missidentifications_sinus.groupby(['gender']).size().reset_index(name='miss_count')\n",
    "identifications_gender_count=identifications_sinus.groupby(['gender']).size().reset_index(name='correct_count')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 148,
   "metadata": {},
   "outputs": [],
   "source": [
    "merged=identifications_gender_count.merge(missidentifications_gender_count, how='outer', on=['gender'])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 149,
   "metadata": {},
   "outputs": [],
   "source": [
    "merged['sum_classifications']=merged['correct_count']+merged['miss_count']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 150,
   "metadata": {},
   "outputs": [],
   "source": [
    "merged['rate']=merged['miss_count']/merged['sum_classifications']\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 151,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>gender</th>\n",
       "      <th>correct_count</th>\n",
       "      <th>miss_count</th>\n",
       "      <th>sum_classifications</th>\n",
       "      <th>rate</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.0</td>\n",
       "      <td>5174</td>\n",
       "      <td>31</td>\n",
       "      <td>5205</td>\n",
       "      <td>0.005956</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>7105</td>\n",
       "      <td>25</td>\n",
       "      <td>7130</td>\n",
       "      <td>0.003506</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   gender  correct_count  miss_count  sum_classifications      rate\n",
       "0     0.0           5174          31                 5205  0.005956\n",
       "1     1.0           7105          25                 7130  0.003506"
      ]
     },
     "execution_count": 151,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merged.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### By Age"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 181,
   "metadata": {},
   "outputs": [],
   "source": [
    "missidentifications_age_count=missidentifications_sinus.groupby(['age']).size().reset_index(name='miss_count')\n",
    "identifications_age_count=identifications_sinus.groupby(['age']).size().reset_index(name='correct_count')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 182,
   "metadata": {},
   "outputs": [],
   "source": [
    "missidentifications_age_count=missidentifications_age_count[missidentifications_age_count['age']!=-1]\n",
    "identifications_age_count=identifications_age_count[identifications_age_count['age']!=-1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 183,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(35, 2)"
      ]
     },
     "execution_count": 183,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "missidentifications_age_count.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 184,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(93, 2)"
      ]
     },
     "execution_count": 184,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "identifications_age_count.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 185,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>age</th>\n",
       "      <th>correct_count</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.0</td>\n",
       "      <td>179</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>4.0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>5.0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>6.0</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>7.0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>88</th>\n",
       "      <td>92.0</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>89</th>\n",
       "      <td>93.0</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>90</th>\n",
       "      <td>94.0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>91</th>\n",
       "      <td>97.0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>92</th>\n",
       "      <td>100.0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>93 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      age  correct_count\n",
       "0     0.0            179\n",
       "1     4.0              6\n",
       "2     5.0              9\n",
       "3     6.0             10\n",
       "4     7.0              6\n",
       "..    ...            ...\n",
       "88   92.0              5\n",
       "89   93.0              5\n",
       "90   94.0              2\n",
       "91   97.0              2\n",
       "92  100.0              2\n",
       "\n",
       "[93 rows x 2 columns]"
      ]
     },
     "execution_count": 185,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "identifications_age_count"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 186,
   "metadata": {},
   "outputs": [],
   "source": [
    "merged=identifications_age_count.merge(missidentifications_age_count, how='outer', on=['age'])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 187,
   "metadata": {},
   "outputs": [],
   "source": [
    "merged=merged.fillna(0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 188,
   "metadata": {},
   "outputs": [],
   "source": [
    "merged['sum_classifications']=merged['correct_count']+merged['miss_count']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 189,
   "metadata": {},
   "outputs": [],
   "source": [
    "merged['rate']=merged['miss_count']/merged['sum_classifications']\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 190,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(93, 5)"
      ]
     },
     "execution_count": 190,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merged.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 191,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x14d920780>]"
      ]
     },
     "execution_count": 191,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAD8CAYAAAB3u9PLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJztvX+0JGd53/l96lf37b6/Zkaj3z9GWDJY4ICRTEj8KwFjhNe2cBa84jgL6+Al8YFjZx17j9hdO7vEPjmc2GD7GDvLArHsE0dgYhsdgqMERADbWGiEiEESQoMQ0kgajTT3zty5t2//qKp3/6h6q96qequ6qrp6+k718zlnztzbt7pv9e3uet7v832e5yUhBBiGYRjGWPQJMAzDMAcDDggMwzAMAA4IDMMwTAgHBIZhGAYABwSGYRgmhAMCwzAMA4ADAsMwDBPCAYFhGIYBwAGBYRiGCbEWfQJVuOSSS8SxY8cWfRoMwzAXFQ888MALQoij0467qALCsWPHcPz48UWfBsMwzEUFEX27zHGcMmIYhmEAcEBgGIZhQjggMAzDMAA4IDAMwzAhHBAYhmEYABwQGIZhmBAOCAzDMAwADgjMgtkfe/iPD5wEb+XKMIuHAwKzUD79yHP4F3/y3/HEmcGiT4Vhlh4OCMxCGbk+AGA48RZ8JgzDcEBgForvB6miiecv+EwYhuGAwCwUlwMC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PhIa16zkS0DuAHEew/AiHEWAhxFi1/nRHs27IS7sbYA/AsWvY6CyE+j2AvGZW81/U2AH8oAv4GwCYRXdHEebQ9IFwF4Cnl+5Phba2FiI4B+B4A9wG4TAjxLBAEDQD1Ntw9uPwWgP8dgNyE9wiAs0IIN/y+ba/3iwA8D+DfhWmyDxFRHy1+nYUQTwP4DQBPIggE5wA8gHa/zpK813Vu17W2BwTdrtStLasiolUA/xHAPxdC7Cz6fOYJEf0YgNNCiAfUmzWHtun1tgC8EsDvCyG+B8AeWpQe0hHmzW8DcD2AKwH0EaRM0rTpdZ7G3N7nbQ8IJwFco3x/NYBnFnQuc4WIbATB4N8LIf40vPk5KSXD/08v6vzmwPcB+AkiegJBKvA1CBTDZphaANr3ep8EcFIIcV/4/ccRBIg2v84/DOBbQojnhRATAH8K4O+j3a+zJO91ndt1re0B4X4AN4YVCQ4CM+ruBZ9T44S58w8DeEQI8T7lR3cDeFv49dsAfOJCn9u8EEK8WwhxtRDiGILX9V4hxE8D+CyAN4WHte05nwLwFBG9OLzptQj2K2/t64wgVfRqIuqF73P5nFv7Oivkva53A3hrWG30agDnZGppVlrfmEZEP4pg5WgC+IgQ4tcXfEqNQ0TfD+ALAL6KOJ/+fyDwET4G4FoEH6w3CyHSxtVFDxH9AwC/JIT4MSJ6EQLFcBjAgwD+sRBitMjzaxIiegUCE90B8DiAn0GwsGvt60xE/w+A/wlBNd2DAH4WQc68Na8zEf0HAP8AwVTT5wD8SwB/Ds3rGgbG30VQlTQA8DNCiEY2m299QGAYhmHK0faUEcMwDFMSDggMwzAMAA4IDMMwTAgHBIZhGAYABwSGYRgmhAMCwzAMA4ADAsMwDBPCAYFhGIYBAPz/8Hp9rBEWEc4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    " plt.plot( merged['age'],merged['rate']) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 192,
   "metadata": {},
   "outputs": [],
   "source": [
    "ages=merged['age'].values\n",
    "miss_rates=merged['rate'].values\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 193,
   "metadata": {},
   "outputs": [],
   "source": [
    "ages=np.concatenate([ages, np.zeros(7)])\n",
    "miss_rates=np.concatenate([miss_rates, np.zeros(7)])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 194,
   "metadata": {},
   "outputs": [],
   "source": [
    "miss_rates_grouped = miss_rates.reshape(10,10)\n",
    "\n",
    "rates_grouped_sum=np.sum(miss_rates_grouped, axis=1)\n",
    "\n",
    "avg_rates_for_groups=np.divide(rates_grouped_sum,10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 195,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAeUAAAFCCAYAAADPKcU0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAGHJJREFUeJzt3X+QXeV93/H3x5LBPwM2yBkHaCUXOYlIY5uq2K5Tj2uSIoJr9QeMxbQudcgwSaCxk86kop3Qmo5mjOvGbjuQhBpSSh0Liu1UxcTENmHiNCmwxNhGYNkboEXFLWLAJGkLROTbP84jc7Xe1Z6Vdtnnovdr5o7Ofe7znPM95569nz3nHp1NVSFJklbfi1a7AEmSNDCUJUnqhKEsSVInDGVJkjphKEuS1AlDWZKkThjKkiR1wlCWJKkThrIkSZ1Yu9oFLMWJJ55Y69evX+0yJElakrvvvvuxqlq3WL+pCuX169czMzOz2mVIkrQkSf77mH6evpYkqROGsiRJnTCUJUnqhKEsSVInDGVJkjphKEuS1AlDWZKkThjKkiR1wlCWJKkThrIkSZ0wlCVJ6oShLElSJ6bqD1JI+m7rt392tUv4joc+dM5q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WFdjCGU0J/2H647gEua+0BrmyvfY15Lvg5wpp/hOH00Fcnlv3jY+pmOLPzX1td9wKf4LkLZF7StvVs2/avW6Z6fxj4cqv33onttKT3mO8O5VHv0zLU/w6eC+VFa2YIxLvb+u4G/jWwZiW38URtX2mP3Qd+5pawPx/PcMT5NeD3gTes9P4MvBGYadvqNxg+1Ee/rwxnXbbMaVvpn78PMgTdvcD1DKf9R+3LDJ8397XHton2Zd0vGD5X72v7woErvMfuBz/L8Fm4n+GI9+OLbVfgJ1rts8D7lvtncKkPb7MpSVIn/E5ZkqROGMqSJHXCUJYkqROGsiRJnTCUJUnqhKEsSVInDGVJkjrx/wGb/KCr+DJ2DQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig = plt.figure()\n",
    "ax = fig.add_axes([0,0,1,1])\n",
    "x = ['0-10', '10-20', '20-30', '30-40', '40-50', '40-50', '50-60', '60-70', '80-90', '90-100']\n",
    "ax.bar(x,avg_rates_for_groups)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
